package club.zhangliyuanblog.dao;

import club.zhangliyuanblog.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author liyuan.zhang
 * @date 2021/2/18 22:53
 */
@Mapper
public interface UserDao {
    /**
     * 查询所有用户信息
     * @return
     */
    List<User> findAll();

    /**
     * 保存用户
     * @param user
     */
    void save(User user);

    void deleteUserById(Integer id);

    void updateUser(User user);

    List<User> findUserByPage(@Param("start") Integer start,@Param("rows") Integer rows);

    Long findTotals();

    int batchInsertUser(List<User> users);
}
